<?php 
if(!isset($MAIN)){
	include_once("includes/class.ibnfm.php");
	$MAIN = new MAIN();
}
if($_REQUEST['text']!=""){
	$table = $_REQUEST['rel_table'];
	$relId = $_REQUEST['id'];
	$text = mysql_real_escape_string($_REQUEST['text']);
	if($MAIN->isIE()){
		$text = utf8_encode($text);
	}		
	$MAIN->notes->setNote('note', $table, $relId, $text);
	?>
	<script type="text/javascript">		
		ajaxGet('notes.php','rel_table=<?php echo($table);?>&rel_id=<?php echo($relId);?>',$('cnt_notes'));
	</script>	
	<?php
}
?>